import 'package:base_flutter/base_flutter.dart';
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:ls_work/viewmodel/use_request/new_add_use_request_view_model.dart';

class NewAddUseRequestPage extends BaseStatefulMvvmWidget{
  num? recordId;

  NewAddUseRequestPage({this.recordId});
  @override
  State<StatefulWidget> createState() => _NewAddUseRequestState();

}

class _NewAddUseRequestState extends BaseMvvmState<NewAddUseRequestViewModel,NewAddUseRequestPage>{
  @override
  Widget buildLoadingContentView() {
    return viewModel.contentView();
  }

  @override
  Widget buildRootView(BuildContext context, Widget loadingContentWidget) {
    return Scaffold(
      appBar: AppBar(
        title: Text("领用申请"),
      ),
      body: loadingContentWidget,
    );
  }

  @override
  NewAddUseRequestViewModel createViewModel() {
    return NewAddUseRequestViewModel(context,recordId: widget.recordId);
  }

  @override
  void onRetryClick() {
    viewModel.getDetailData();
  }

}